#!/bin/sh
cd image 
find eclipse-cdt       -type f         | tr / "\\" 2>/dev/null >../filelist_cdt.tmp
find eclipse-windriver -type f         | tr / "\\" 2>/dev/null >../filelist_wrwb.tmp
cd ..
cat filelist_cdt.tmp | sed -e "s#eclipse-cdt\(.*\)#File /a \"/oname=eclipse\1\" \"image\\\\eclipse-cdt\1\"#" > imageinstall_cdt.nsi
cat filelist_wrwb.tmp | sed -e "s#eclipse-windriver\(.*\)#File /a \"/oname=eclipse\1\" \"image\\\\eclipse-windriver\1\"#" > imageinstall_wrwb.nsi
cat filelist_cdt.tmp      | sed -e "s#eclipse-cdt\(.*\)#Delete \"\$INSTDIR\\\\eclipse\1\"#" > imageuninstall_cdt.nsi
cat filelist_wrwb.tmp      | sed -e "s#eclipse-windriver\(.*\)#Delete \"\$INSTDIR\\\\eclipse\1\"#" > imageuninstall_wrwb.nsi
rm *.tmp